package com.eling.elcms.privilege.service;

import com.eling.elcms.core.webapp.controller.Msg;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface IUserFindPwdService {

	/**
	 * 发送找回密码的邮件
	 * 
	 * @param request
	 * @param email
	 * @return
	 */
	Msg sendFindPwdEmail(final HttpServletRequest request, String email);

	/**
	 * 校验邮件
	 * 
	 * @param pkUser
	 * @param token
	 * @param req
	 * @param res
	 * @return
	 */
	ModelAndView validateFindPwdEmail(String pkUser, String token, HttpServletRequest req, HttpServletResponse res);

	/**
	 * 修改密码
	 * 
	 * @param request
	 * @param pkUser
	 * @param passWord
	 * @return
	 */
	Msg updateUserPwd(final HttpServletRequest request, String pkUser, String passWord);

	/**
	 * 校验验证码
	 * 
	 * @param request
	 * @param username
	 * @param openid
	 * @param phone
	 * @param vcode
	 * @return
	 */
	Msg validateCode(final HttpServletRequest request, String username, String phone, String vcode);

	/**
	 * 发送验证码
	 * 
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	Msg sendValidateCode(HttpServletRequest request, HttpServletResponse response) throws Exception;
}
